package com.home.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.dao.RentDao;
import com.home.model.Rent;
import com.home.service.RentService;
@Service("rentService")
public class RentServiceImpl implements RentService{
	@Autowired
	private RentDao<Rent,Integer> rentDao;

	public RentDao<Rent, Integer> getRentDao() {
		return rentDao;
	}

	public void setRentDao(RentDao<Rent, Integer> rentDao) {
		this.rentDao = rentDao;
	}

	public void delete(Rent rent) {
		this.getRentDao().delete(rent.getId());
	}

	public List<Rent> getList() {
		return this.getRentDao().getAll();
	}

	public Rent getRent(Integer id) {
		return this.getRentDao().get(id);
	}

	public void save(Rent rent) {
		this.getRentDao().save(rent);
	}

}
